package com.xomily.devops.agent.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * @version V1.0
 * @ClassName:DevHost.java
 * @author: xomily (2327742507@qq.com)
 * @date: 2021年12月02日
 * @Description: DevHost.java
 * @Copyright: 2021-2022 www.xomily.com. All rights reserved.
 */
public class DevHost extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 名称 */
    private String name;

    /** Ip地址 */
    private String ip;

    /** 主机名称 */
    private String hostname;

    /** 系统名称 */
    private String os;

    /** 系统架构 */
    private String arch;

    /** CPU型号 */
    private String cpu;

    /** CUP核心数 */
    private Integer cpuCores;

    /** CPU使用率 */
    private BigDecimal cpuRate;

    /** 风扇 */
    private String fan;
    
    /** 温度 */
    private BigDecimal temperature;

    /** 内存大小 */
    private String mem;

    /** 内存使用率 */
    private BigDecimal memRate;


    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setHostname(String hostname) 
    {
        this.hostname = hostname;
    }

    public String getHostname() 
    {
        return hostname;
    }
    public void setOs(String os) 
    {
        this.os = os;
    }

    public String getOs() 
    {
        return os;
    }
    public void setArch(String arch) 
    {
        this.arch = arch;
    }

    public String getArch() 
    {
        return arch;
    }
    public void setCpu(String cpu) 
    {
        this.cpu = cpu;
    }

    public String getCpu() 
    {
        return cpu;
    }
    public void setCpuCores(Integer cpuCores) 
    {
        this.cpuCores = cpuCores;
    }

    public Integer getCpuCores() 
    {
        return cpuCores;
    }
    public void setCpuRate(BigDecimal cpuRate) 
    {
        this.cpuRate = cpuRate;
    }

    public BigDecimal getCpuRate() 
    {
        return cpuRate;
    }

    public void setFan(String fan) 
    {
        this.fan = fan;
    }

    public String getFan() 
    {
        return fan;
    }
    
    public void setTemperature(BigDecimal temperature) 
    {
        this.temperature = temperature;
    }

    public BigDecimal getTemperature() 
    {
        return temperature;
    }
    public void setMem(String mem) 
    {
        this.mem = mem;
    }

    public String getMem() 
    {
        return mem;
    }
    public void setMemRate(BigDecimal memRate) 
    {
        this.memRate = memRate;
    }

    public BigDecimal getMemRate() 
    {
        return memRate;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("ip", getIp())
            .append("hostname", getHostname())
            .append("os", getOs())
            .append("arch", getArch())
            .append("cpu", getCpu())
            .append("cpuCores", getCpuCores())
            .append("cpuRate", getCpuRate())
            .append("fan", getFan())            
            .append("temperature", getTemperature())
            .append("mem", getMem())
            .append("memRate", getMemRate())
            .append("createTime", getCreateTime())
            .toString();
    }
}
